<?php

if (!defined('NV_SYSTEM')) { die ("You can't access this file directly..."); }

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
if (file_exists("".$datafold."/config_".$module_name.".php")) {
	@require_once ("".$datafold."/config_".$module_name.".php");
}
if (defined('_MODTITLE')) $module_title = _MODTITLE;
##########################################

    if (!$pid=="") {
    $pid = intval($pid);
    if ((stristr($REQUEST_URI,"mainfile")) || (!isset($pid))) { exit; }
    
$sql = "SELECT cid, bodytext, chuthe, nguoiky  FROM ".$prefix."_vanban WHERE pid='$pid'";
    $result = $db->sql_query($sql);
    $row = $db->sql_fetchrow($result);
    $cid = intval($row[cid]);
    $bodytext = $row[bodytext];
    $chuthe = $row[chuthe];
    $nguoiky = $row[nguoiky];
    $url = $row[url];
    
    if ($bodytext==""){$bodytext=_BODY;}    
    echo "
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset="._CHARSET."\">
<title>$sitename - $title</title>
<script language=\"JavaScript\">
<!-- Begin
function varitext(text){
text=document
print(text)
}
//  End -->
</script>
</head>
<body link=\"#4D5764\" vlink=\"#4D5764\" alink=\"#4D5764\" text=\"#4D5764\">
<center>
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\">
<tr>
<td><b><font size=\"4\">$sitename</font></b></td>
<td align=\"right\"><font size=\"4\"><a href=\"$nukeurlv\" target=\"_blank\">$nukeurlv</a></font></td>
</tr>
</table>
<hr color=\"#DC0312\" width=\"600\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\">
<tr>
<td>
<font size=\"2\">$datetime | <a href=\"javascript:;\" onClick=\"varitext()\">"._PRINT."</a> | <a href=\"\" onclick=\"window.close();\">"._CLOSEWIN."</a></font><br><br>
<p align=\"justify\">
$bodytext<br>
</td>
</tr>
</table>
<hr color=\"#DC0312\" width=\"600\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\">
<tr>
<td align=\"center\">"._THEURL.": <a href=\"$nukeurlv/modules.php?name=$module_name&go=page&pid=$pid\" target=\"_blank\">$nukeurlv/modules.php?name=$module_name&go=page&pid=$pid</a></td>
</tr>
</table>
<hr color=\"#4D5764\" width=\"600\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"600\">
<tr>
<td><font size=\"2\">&copy; </font> <a href=\"$nukeurlv\" target=\"_blank\"><font size=\"2\">$sitename</font></a></td>
<td align=\"right\"><font size=\"2\">contact: </font> <a href=\"mailto:$adminmail\"><font size=\"2\">$adminmail</font></a></td>
</tr>
</table>
</center>
</body>
</html>
    ";
} else { exit; }

?>
